# Contributor: Will Jordan <will.jordan@gmail.com>
# Maintainer: Will Jordan <will.jordan@gmail.com>
pkgname=vips
pkgver=8.10.0
pkgrel=0
pkgdesc="A fast image processing library with low memory needs"
options="!check" # oss-fuzz fails
url="http://www.vips.ecs.soton.ac.uk/"
arch="all !s390x !ppc64le !mips !mips64" # test_seq.sh fails on ppc64le
license="LGPL-2.1-or-later"
makedepends="expat-dev fftw-dev giflib-dev glib-dev lcms2-dev
	libexif-dev libjpeg-turbo-dev libpng-dev libwebp-dev
	orc-dev tiff-dev libheif-dev gobject-introspection-dev
	libimagequant-dev librsvg-dev"
checkdepends="bc"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-tools"
source="https://github.com/libvips/libvips/releases/download/v$pkgver/vips-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-debug=no \
		--without-gsf \
		--disable-static \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--docdir=/usr/share/doc \
		--enable-introspection
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	pkgdesc="Command-line tools for $pkgname"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="7ba2fdc4ea995b5a037246cd604c0eff493391875a521c1f03be43148361b27fa4b137ce2df430cd8499b307f61f96dde9c774b27dafec28b15d1f26ffbda15b  vips-8.10.0.tar.gz"
